From d7f328f01f39662ed6032bc2869baf147675d473 Mon Sep 17 00:00:00 2001 From: "mjw@wray-m-3.hpl.hp.com" Date: Mon, 12 Jul 2004 15:42:24 +0000 Subject: [PATCH] bitkeeper revision 1.1062.3.4 (40f2b160cK4vITpgYulcbL0jKHqM4A) Debug prints and small fix to ioctxt struct. --- tools/xfrd/xen_domain.c | 8 +++++++- tools/xfrd/xfrd.c | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/xfrd/xen_domain.c b/tools/xfrd/xen_domain.c index d0f73e5b20..adef919af1 100644 --- a/tools/xfrd/xen_domain.c +++ b/tools/xfrd/xen_domain.c @@ -18,9 +18,13 @@ #ifndef _XEN_XFR_STUB_ static int domain_suspend(u32 dom, void *data){ + int err = 0; Conn *xend = data; - return xfr_vm_suspend(xend, dom); + dprintf("> dom=%lu data=%p\n", dom, data); + err = xfr_vm_suspend(xend, dom); + dprintf("< err=%d\n", err); + return err; } static int xc_handle = 0; @@ -29,6 +33,7 @@ int xcinit(void){ if(xc_handle <= 0){ xc_handle = xc_interface_open(); } + dprintf("< xc_handle=%d\n", xc_handle); return xc_handle; } @@ -72,6 +77,7 @@ int xen_domain_snd(Conn *xend, IOStream *io, uint32_t dom, char *vmconfig, int v #else XcIOContext _ioctxt = {}, *ioctxt = &_ioctxt; dprintf("> dom=%d\n", dom); + ioctxt->domain = dom; ioctxt->io = io; ioctxt->info = iostdout; ioctxt->err = iostderr; diff --git a/tools/xfrd/xfrd.c b/tools/xfrd/xfrd.c index 7f3f63f47d..301674b1fe 100644 --- a/tools/xfrd/xfrd.c +++ b/tools/xfrd/xfrd.c @@ -711,8 +711,10 @@ int xfr_save(Args *args, XfrState *state, Conn *xend, char *file){ int err = 0; IOStream *io = NULL; + dprintf("> file=%s\n", file); io = file_stream_fopen(file, "wb"); if(!io){ + dprintf("> Failed to open %s\n", file); err = -EIO; goto exit; } @@ -727,6 +729,7 @@ int xfr_save(Args *args, XfrState *state, Conn *xend, char *file){ IOStream_close(io); IOStream_free(io); } + dprintf("< err=%d\n", err); return err; } -- 2.30.2